#/bin/ash
/etc/init.d/frpc stop

uci delete frpc.$3

uci set frpc.common.server_port=$2
uci set frpc.common.server_addr=$1

uci set frpc.$3=conf
uci set frpc.$3.type='tcp'
uci set frpc.$3.use_encryption='false'
uci set frpc.$3.use_compression='false'
uci set frpc.$3.local_ip=$4
uci set frpc.$3.local_port=$5
uci set frpc.$3.remote_port=$6

uci commit

/etc/init.d/frpc start